<!DOCTYPE html>
<html lang="{{ @this->lang() }}">
<head>
    <include href="blocks/head.html" />
</head>
<body>
<include href="blocks/navbar.html" />
<div class="container">
    <include href="blocks/admin/tabs.html" />
    <div class="table-responsive">
        <table class="table table-striped table-condensed">
            <thead>
                <tr>
                    <th>{{ @dict.name }}</th>
                    <th>{{ @dict.cols.author }}</th>
                    <th>{{ @dict.version }}</th>
                    <check if="{{ @user.rank >= \Model\User::RANK_SUPER }}">
                        <th></th>
                    </check>
                </tr>
            </thead>
            <tbody>
                <repeat group="{{ @plugins }}" value="{{ @plugin }}" key="{{ @key }}">
                    <set meta="{{ @plugin->_meta() }}" />
                    <tr>
                        <td>{{ @meta.package | esc }}</td>
                        <td>{{ @meta.author | esc }}</td>
                        <td>{{ @meta.version }}</td>
                        <td>
                            <check if="{{ @user.rank >= \Model\User::RANK_SUPER && is_callable(array(@plugin, '_admin')) }}">
                                <a href="{{ @BASE }}/admin/plugins/{{ @key }}">Details</a>
                            </check>
                        </td>
                    </tr>
                </repeat>
            </tbody>
        </table>
    </div>
    <include href="blocks/footer.html" />
</div>
</body>
</html>
